package bishi.day13_5_9;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

/**
 * 参数解析
 * @author 是阿秋啊
 * @date 2022/05/09 16:27
 **/
public class can_shu_fenxi {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            String str = sc.nextLine();
            List<String> ret = new LinkedList<>();
            int i = 0;
            int j = 0;
            int len = str.length();
            while(i < len && j < len) {
                while(str.charAt(i) == ' ') {
                    i++;
                }
                j=i + 1;
                if (str.charAt(i) == '"') {
                    // 遇到双引号则不用用空格分割
                    while(j<len && str.charAt(j) != '"') {
                        j++;
                    }
                    ret.add(str.substring(i + 1,j));
                } else {
                    while(j < len && str.charAt(j) != ' ') {
                        j++;
                    }
                    ret.add(str.substring(i,j));
                }
                i=j+1;
            }
            int size = ret.size();
            System.out.println(size);
            for (int k = 0; k < size; k++) {
                System.out.println(ret.get(k));
            }
        }
    }
}
